select DISTINCT ctp_affair."ID",ctp_affair.SUBJECT,ctp_affair.MEMBER_ID,FORMMAIN_0067.FIELD0070 as members ,col_summary.FORM_RECORDID as fId from ctp_affair 
left outer join col_summary on ctp_affair.OBJECT_ID=col_summary.ID AND ctp_affair.MEMBER_ID = COL_SUMMARY.CURRENT_NODES_INFO
left outer join  FORMMAIN_0067 on col_summary.FORM_RECORDID=FORMMAIN_0067.id
LEFT JOIN formson_0068 ON formson_0068.FORMMAIN_ID = FORMMAIN_0067."ID" 
WHERE  COL_SUMMARY.TEMPLETE_ID = '-8939748753149769765' AND CTP_AFFAIR.STATE = 3 AND FORMMAIN_0067.FIELD0140 = 0 AND "TO_CHAR"(FORMSON_0068.FIELD0010,'yyyy-MM') = "TO_CHAR"(add_months(trunc(sysdate),-1),'yyyy-MM')
AND col_summary.STATE = 0